home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 45
/
Aminet 45 (2001)(GTI - Schatztruhe)[!][Oct 2001].iso
/
Aminet
/
game
/
role
/
ldmud-3.2-bin.lha
/
mud
/
INSTALL
< prev
next >
Wrap
Text File
|
2001-08-06
|
12KB
|
294 lines
Topics covered:
- Unix or Unix-like systems, with additional details for FreeBSD, AIX 3.4,
and DEC Ultrix.
- IPv 6
- mySQL
- BeOS
- Window 95/98/NT
- OS/2
Unix or Unix-like system
------------------------
The driver uses a standard autoconfiguration system which on most
systems does all the work for you (for exceptions see below).
To prepare the compilation, execute the 'configure' script from
within the src/ directory.
configure checks for a number of site specific settings and uses this
information to create the files machine.h (from machine.h.in), Makefile
(from Makefile.in) and config.h (from config.h.in). We'll come back to
config.h below.
configure takes a lot of arguments (--help will tell you everything),
but the most important are these:
--prefix=PREFIX: the base directory for the mud installation,
defaults to /usr/local/mud .
--bindir=DIR: the directory to install the executables in,
defaults to ${PREFIX}/bin .
--libdir=DIR: the directory where the mudlib is found,
defaults to ${PREFIX}/lib .
--libexecdir=DIR: the directory where the programs for the ERQ are found,
defaults to ${PREFIX}/libexec .
These settings are written into the Makefile and compiled into the driver,
just the mudlib directory setting can be changed with a commandline
argument.
A lot of the drivers parameters can be tweaked for better performance; these
parameters are defined in config.h . This file too is created by configure,
which provides sensible defaults for all parameters for which no explicite
setting is provided. To tweak a setting yourself, pass the argument
'--enable-<option>=yes|no' resp. '--with-<option>=<value>' to configure on
the commandline.
Alternatively, the indivial specifications can be collected in a settings
file, which is stored in the directory src/settings/. To use the
setting file <osb>, give '--with-<osb>' as argument to configure. The
file src/settings/default documents the available settings. The setting
files are self-executing: './settings/<foo> [<extra-configure-args>]' will
start configure with the proper commandline arguments.
The following environment variables can be used to tweak the behaviour
of the configure script:
CC: the name of the C compiler
CFLAGS: compiler flags to be used during the configure script
EXTRA_CFLAGS: compiler flags to be used when compiling the game driver
LDFLAGS: linker flags to be used by configure and for linking the
game driver.
After configuration is finished, you may want to modify the Makefile
to fine tune those parameters which are not covered by the configuration.
The compilation is done using make. Following targets are implemented:
<none>: compile the driver
install: compile the driver and install it in ${bindir}
utils: compile the utilities, especially the ERQ demon
install-utils: compile and install the utilities in ${bindir}
To actually run a mud, you need a mudlib. The driver comes with the
source of the old 2.4.5 mudlib in mud/lp-245/, support for other mudlibs
is also found in mud/. Copy all mudlib files into your 'lib' directory
and make sure that the files from mudlib/sys/ all go into your lib's
include directory (usually 'sys/').
To test the driver, start it with 'driver &'. If you see the message
'Setting up ipc', the driver is up and accepting connections. Test
it with 'telnet localhost 4242'.
FreeBSD:
When using gcc, it can happen that the compiler
aborts with signal 10 or 11. The reasons are unknown, but you can
restart the compilation process by typing "make" again (and again...).
AIX 3.4:
The native compiler comes in several forms, of which only the
basic form 'xlc' works with the configuration script.
Start the script as:
CC=xlc ./configure ...
DEC Ultrix:
Depending on the system configuration you might be unable to
compile 'interpret.c' with any kind of optimization at all.
The typical symptom is a failure during the compilation with
"Error code 1". When that happens, do the following steps:
- Make as usual until the "interpret" compilation
fails. The symptom is "Error code 1".
- Edit the makefile. Uncomment the compilation
line for debugging, and comment the compilation
line containing the optimization switches and
options.
- Start the make again. After the "interpret"
compilation completes, control-C out of the
compilation.
- Edit the makefile again. Re-comment the line
for debugging, and uncomment the line with
the optimization switches and options.
- Start the make again. This time it will
complete as expected.
IPv6
----
If your machine supports IPv6, the driver can be configured to use it: give
'--enable-use-ipv6=yes' as argument to the configure script.
Beware: the driver support is rudimentary, experimental, and may cease to
function on the next full moon. Additional work is necessary to really
change _all_ address-related functions in driver and mudlibs.
IPv6 support was implemented by Uwe <mai94cch@studserv.uni-leipzig.de>.
In order to test IPv6 under Linux you need a 2.2.x kernel (preferably 2.2.10
or better) and the inet6 apps. If you use glibc 2.0, you need version 0.35
of the inet6 apps, or for glibc 2.1 you need version 0.36. The apps should
installed into /usr/inet6.
The apps are available on ftp.inner.net or on its mirrors, e.g.
<URL:ftp://6bone.informatik.uni-leipzig.de/pub/ftp.inner.net/pub/ipv6/inet6-apps-0.35.tar.gz>
resp.
<URL:ftp://6bone.informatik.uni-leipzig.de/pub/ftp.inner.net/pub/ipv6/inet6-apps0.36.tar.gz>
Furthermore you need a connection to the 6bone
(<URL:http://www.join.uni-muenster.de/>).
Newer versions of AIX also come with IPv6 support.
mySQL
-----
If your machine has mySQL installed, the driver can be configured to use
it: give '--enable-use-mysql=yes' as argument to the configure script.
Alternatively, if your mySQL uses an unusual include/library path,
the option can be given as '--enable-use-mysql=/unusual/path', which
will use the given path as search path for both include and library
files in addition to the normal system search paths. The include files will
be searched in <path>/include and <path>, the library files will be search
in <path>/lib/mysql, <path>/lib, and <path>, in this order.
Before you compile the driver, you have to add the username and password
of the Mud user to the driver (if you haven't done so already, now would
be a good time to set up this user in the mySQL database).
Enter this username and password in the file pkg-mysql.c, function
mysql_real_connect(), and compile the driver (the username and
password are built into the driver for security reasons).
If you chose to not create either a username and/or a password,
leave the corresponding entry at 0.
Use mysqladmin to create any databases you want to provide - the
names are later used in the efun db_connect() to connect to
the databases.
BeOS
----
Under BeOS, the driver can be configured and compiled in two ways:
1. Using the provided configuration files.
Copy the files machine.h, config.h and Makefile from src/hosts/be/
to src/. You may have to edit config.h and Makefile if you have
to use a specific mudlib with exotic settings.
Advantage of this method is that the Makefile allows cross-compilation
and covers Be specifics like file icon, type and version.
2. Use the Unix configure mechanism.
In general just follow the instructions given for Unix systems, but
be aware of the follwing:
- If the configure script doesn't properly work, try starting it
with
CC="$BE_C_COMPILER" EXTRA_CFLAGS="$BE_DEFAULT_C_FLAGS" ./configure
or (especially on BeOS R4.5 on PPC) even
CC=cc EXTRA_CFLAGS="$BE_DEFAULT_C_FLAGS" ./configure
- the created executable will have neither icon nor type.
- cross compilation is not supported.
- the Makefile defaults to best optimization which needs a lot
of memory during compilation.
If on driver start you get an error about an unknown hostname or
seems to hang, you're missing an /etc/hosts file:
- In the network preferences, select a name for you machine,
e.g. 'bebox'. The domain name field can be blank.
- Copy the /boot/beos/etc/hosts-sample file to /boot/beos/etc/hosts,
and edit it to contain at least the following lines:
127.0.0.1 bebox.my-isp.com bebox
127.1 bebox.my-isp.com bebox
(Note: in the file, every line has to start with the IP address -
no leading spaces are allowed).
With the current networking implementation, the driver is unable
to start ERQs. In order to use ERQs, you have to start them manually.
Other than this, the installation steps are the same as for Unix.
Windows 95/98/NT
----------------
To compile the gamedriver for Windows, you need the 'Cygwin' package,
which is a port of gcc, bash, and other GNU/Unix programs. Once it
is installed and running, the procedure is the same as under Unix.
CygWin is available from <URL:http://www.cygwin.com/>.
One common pitfall is if the installation does not create the '/bin'
directory in which the CygWin executables are expected. A typical
error message would be 'make: /bin/sh not found'.
Solution 1: Create a directory 'bin' in your search path (e.g. c:\bin)
and copy all required executables (in this case 'sh.exe') into
that directory.
Solution 2 (this can be done in a script): cd into the directory
where the executables are stored, e.g.
/compiler/Cygnus/B19/H-i386-cygwin32/bin . In this directory, give
the command 'mount $PWD /bin'.
A driver compiled by David Gibbs (ishara@btinternet.com) is available
at <URL:http://www.einy.freeserve.co.uk/lpmud.index.html>.
The following comments were provided by Robert Nurrie(?) who had
an misconfigured Cygnus installation (Summer 2000):
"Make sure you've used the setup.exe you get when clicking the 'install
cygwin now' link in the upper right corner of their website, instead of
the setup.exe found on the ftp-site.
Oh, and when you're given the choice of default text file type you
should of course chose Dos, as that seems to be the key."
Brandon Mathis points out, "that to compile under Windows you have to
use 'tar -xvfz' and not WinZIP to extract the source".
OS/2
----
The OS/2 port uses the EMX (a gcc version) to compile the gamedriver.
To compile the driver, copy the machine.h and Makefile from the hosts/os2
directory into the top directory and make as under Unix. The Makefile
is configured to install the driver in /mud - edit the variable 'prefix'
if you want a different directory.
Important: the Makefile must be save using the Unix lineend convention,
otherwise the make program will stop with an error. In the EPM editor
this can be achieved using the 'save -u' command.
If you have the full GNU suite installed, you can also configure the
driver as under Unix. Following caveats regarding the configure script:
- the ac_exeext variable may not be set to '.exe' as it should be;
- the calls to the program conftest may lack the ${ac_exeext} extension.
Additionally, configure does not properly recognize the settings for
HAVE_GETRUSAGE, GETRUSAGE_RESTRICTED, GETRUSAGE_VIA_SYSCALL and RUSAGE_USEC.
Copy these values from the provided machine.h
To recreate the configure script from configure.in, you need autoconf
version 2.50 or newer.